const accountService = require('../service/account.service');

class AccountController {
  // 账户登录
  async accountLogin(ctx, next) {
    const {username, password} = ctx.query;

    const result = await accountService.accountLogin(username, password);

    ctx.body = result;
  }

  // 账户注册
  async accountRegister(ctx, next) {
    const {username, password} = ctx.query;

    const result = await accountService.accountRegister(username, password);

    ctx.body = result;
  }
}

module.exports = new AccountController();